package com.dragonwu.controller;

import com.dragonwu.api.SayHelloService;
import com.dragonwu.dto.MsgDto;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Dragon Wu
 * @since 2022-10-16 20:14
 **/
@RestController
public class ConsumerController {

    @DubboReference
    private SayHelloService sayHelloService;

    @GetMapping("/sayHello/{msg}")
    public String sayHello(@PathVariable("msg") String msg){
        return sayHelloService.sendMsg(msg).toString();
    }
}
